public class Leet600 {
    public static void main(String[] args) {
        Leet600 l = new Leet600();
        System.out.println(l.findIntegers(100));
    }
    public int findIntegers(int n) {
        String bn = Integer.toBinaryString(n);
        int[] dp = new int[bn.length()];
        dp[0] = 2;
        if (bn.length()>1)
            dp[1] = 1;
        for (int i = 2; i < dp.length; i++) {
            dp[i] = dp[i-1]+dp[i-2];
        }
        int re = 0;
        for (int i = 0; i < dp.length; i++) {
            re+=dp[i];
        }
        return re;
    }
}
